<!doctype html>
<style>
  textarea {
    /* The paint worklet subscribes to changes to these custom proeprties*/
    --checkerboard-spacing: 10;
    --checkerboard-size: 32;
    background-image: paint(checkerboard);
  }
</style>
<textarea></textarea>
<script>
  if (location.protocol === 'http:' && location.hostname !== 'localhost')
    location.protocol = 'https:';
  if ('paintWorklet' in CSS) {
    CSS.paintWorklet.addModule('demo2.js');
  } else {
    document.body.innerHTML = 'You need support for <a href="https://drafts.css-houdini.org/css-paint-api/">CSS Paint API</a> to view this demo :(';
  }
</script>
